package com.cosmoplat.xikai.business.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.cosmoplat.xikai.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

/**
 *
 * @TableName base_work_order
 */
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

/**
 * 派工单表 (work_order)
 **/
@Data
@ApiModel(value = "派工单信息", description = "用于表示系统中的派工单信息")
public class BaseWorkOrder extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键", required = true, example = "1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 派工单ID
     */
    @ApiModelProperty(value = "派工单ID", required = true, example = "WO001")
//    @NotBlank(message = "派工单ID不能为空")
    private String orderId;

    /**
     * 派工单号
     */
    @ApiModelProperty(value = "派工单号", required = true, example = "WONumber001")
    @NotBlank(message = "派工单号不能为空")
    private String orderNo;

    /**
     * 物料ID
     */
    @ApiModelProperty(value = "物料ID", required = true, example = "MAT001")
    private String materialId;

    /**
     * 物料编号
     */
    @ApiModelProperty(value = "物料编号", required = true, example = "CODE001")
    private String materialCode;

    /**
     * 物料名称
     */
    @ApiModelProperty(value = "物料名称", required = true, example = "示例物料")
    private String materialName;

    /**
     * 物料规格
     */
    @ApiModelProperty(value = "物料规格", example = "100x200mm")
    private String materialSpec;

    /**
     * 物料型号
     */
    @ApiModelProperty(value = "物料型号", example = "MODEL-A")
    private String materialModel;

    /**
     * 任务状态，默认值为0
     */
    @ApiModelProperty(value = "任务状态，默认值为0", example = "0")
    private Integer taskStatus;

   /*
   25-2 客户新增展示字段
    projectCode	工程号
    projectName	工程名称
    */
    /**
     * 工程号
     */
    @ApiModelProperty(value = "工程号", example = "CODE001")
    private String projectCode;

    /**
     * 工程名称
     */
    @ApiModelProperty(value = "工程名称", example = "示例工程")
    private String projectName;


    /**
     * 逻辑删除标志，默认未删除
     */
    @ApiModelProperty(value = "逻辑删除标志，默认未删除", example = "false")
    private Boolean isDelete;

    /**
     * 任务列表
     **/
    @ApiModelProperty(value = "任务列表")
    @TableField(exist = false)
    @NotEmpty(message = "派工单任务列表不能为空")
    private List<BaseDispatchTask> dispatchTask;
}